﻿#pragma once
#include <QWidget>

/////////////////////////////////////////////////
/// 登录时使用的验证码
/////////////////////////////////////////////////
class VerifyCodeWidget : public QWidget
{
    Q_OBJECT
public:
    explicit VerifyCodeWidget(QWidget* parent = nullptr);
    void refresh_verify_code();
    bool check_verify_code(const QString& code);
protected:
    void paintEvent(QPaintEvent* event) override;
    void mousePressEvent(QMouseEvent* event) override;
private:
    QString generate_code();
    QString verify_code;
};